Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 5 - Printing Functions for Message Overrides / Printing Functions Reference
Functions / Reporting Information to the User


GXPrintingAlert

You can use the GXPrintingAlert function to create and display a printing alert box. This function creates the alert box from its parameters. The GXGetPrintingAlert function, which is described in the previous section, displays a printing alert box that is created from a resource definition.

OSErr GXPrintingAlert (short iconId, short txtSize,
                  short defaultTitleNum, short cancelTitleNum,
                  short textLength, Ptr pAlertMsg,
                  StringPtr actionTitle, StringPtr title2,
                  StringPtr title3, StringPtr msgFont,
                  ModalFilterProcPtr filterProc, short *itemHit,
                  StringPtr alertTitle);
iconId
The type of icon to display in the printing alert box. Use one of the following constants for the value of this parameter: noIcon, stopIcon, cautionIcon, or noteIcon.
txtSize
The font size of the text to display in the printing alert box. You can use the value defaultSystemSize to indicate that the default text size for the system is to be used.
defaultTitleNum
The type of text string to display on the default button. Use one of the following constants as the value of this parameter: noDefaultTitle, defaultAction, defaultTitle2, or defaultTitle3.
cancelTitleNum
The type of text string to display on the Cancel button. Use one of the following constants as the value of this parameter: noCancelTitle, cancelAction, cancelTitle2, or cancelTitle3.
textLength
The length of the text string that is to be displayed in the printing
alert box.
pAlertMsg
A pointer to the message text to display in the printing alert box.
actionTitle
A pointer to the string to display on the action button.
title2
A pointer to the string to display on button 2.
title3
A pointer to the string to display on button 3.
msgFont
A pointer to a string that names the font to use for displaying the text string in the printing alert box.
filterProc
A pointer to the function to use for filtering events that occur while the alert is displayed.
itemHit
On return, the ID of the item that was selected by the user to dismiss the alert box.
alertTitle
The string that is displayed in the title bar of the printing alert box.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
The GXPrintingAlert function displays a printing alert box, building it from the parameters that you pass instead of from a printing alert ('plrt') resource.

User-initiated events that occur while the alert box is displayed are filtered through the function that is specified by the filterProc parameter. When the user dismisses the alert box by selecting an item, this function returns in the itemHit parameter the ID of the item that was selected.

Each of the parameters to this function matches a field in the printing alert resource.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The printing alert resource is described in the section "The Printing Alert ('plrt') Resource" beginning on page 6-21 in the chapter "Printing Resources."

You can use the GXGetPrintingAlert function, which is described on page 5-18, to display a printing alert box that is created from a resource definition.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help